//
//  AppModels.swift
//  MIFI
//
//  Created by 金嗓子卡卡 on 2019/5/14.
//  Copyright © 2019 NJMifi. All rights reserved.
//

import Foundation

struct SMSListModel : Codable{
    let messages : [Message]?
    struct Message : Codable {
        
        let content : String?
        let date : String?
        let draftGroupId : String?
        let id : String?
        let number : String?
        let tag : String?
        
        
        enum CodingKeys: String, CodingKey {
            case content = "content"
            case date = "date"
            case draftGroupId = "draft_group_id"
            case id = "id"
            case number = "number"
            case tag = "tag"
        }
        init(from decoder: Decoder) throws {
            let values = try decoder.container(keyedBy: CodingKeys.self)
            content = try values.decodeIfPresent(String.self, forKey: .content)
            date = try values.decodeIfPresent(String.self, forKey: .date)
            draftGroupId = try values.decodeIfPresent(String.self, forKey: .draftGroupId)
            id = try values.decodeIfPresent(String.self, forKey: .id)
            number = try values.decodeIfPresent(String.self, forKey: .number)
            tag = try values.decodeIfPresent(String.self, forKey: .tag)
        }
    }
}

struct USSDModel : Codable {
    let ussd_write_flag : String?
}
